package com.example.shw

import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper

class MyDatabaseHelper (context: Context, name: String, version: Int) : SQLiteOpenHelper(context, name, null, version){
    override fun onUpgrade(db: SQLiteDatabase?, oldVersion: Int, newVersion: Int) {
        println("-------onUpgrade Called---------$oldVersion---->$newVersion")
    }

    override fun onCreate(db: SQLiteDatabase) {
        db.execSQL("create table news_inf(_id interger" + " primary key autoincrement," +
                " news_title varchar(50)," + " news_content varchar(255))")
    }

}